-
Notifications
You must be signed in to change notification settings - Fork 18
Fix loading bug on anomalies live chart #129
Fix loading bug on anomalies live chart #129
Conversation
true | ||
); | ||
// need to initially check if there is an error when accessing anomaly results index | ||
// in the case that it doesn't exist upon cluster initialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Can you help check if other places have similar issue? Like detector list page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked - detector list page doesn't ping anomaly results idx
dispatch, | ||
-1, | ||
1, | ||
true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if you change this to false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't that change the functionality of the call? I think we just want to encapsulate any error here (which can definitely be caused by the index not existing yet) and set is loading to false.
* Fix loading bug on live anomalies chart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may also want to include the call at line 119 into the try catch
* Fix loading bug on live anomalies chart
Issue #, if available:
Description of changes:
Adds error checking to anomalies live chart in the case that .opendistro-anomaly-results index does not exist yet. Without error checking, chart was getting stuck in an infinite loading state. This fixes that.
Before:
After:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.